<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
	<form id="menu_addFrom" method="post" action="/manage/addmenu">
		<div style="width: 200px;margin:50px auto">
			<div style="margin-bottom:20px;">
		       <label for="menu_addFrom_name">菜单名称:</label>
		       <input id="menu_addFrom_name" class="easyui-textbox" type="text" name="name" data-options="required:true" style="width:200px"/>
		   </div>
		      <div style="margin-bottom:20px;">
			       <label for="menu_addFrom_urlPath">菜单路径:</label>
			       <input id="menu_addFrom_urlPath" class="easyui-textbox" type="text" name="urlPath" data-options="required:true" style="width:200px"/>
			   </div>
		      <div style="margin-bottom:20px;">
			       <label for="menu_addFrom_sortOrder">排序:</label>
			       <input id="menu_addFrom_sortOrder" class="easyui-textbox" type="text" name="sortOrder" data-options="required:true" style="width:200px"/>
			   </div>
			<div style="margin-bottom:30px;">
		       <label for="email">是否有父菜单:</label>
		       是<input class="easyui-validatebox" type="radio" name="isParent" value="1" checked="checked"/>
		       否<input class="easyui-validatebox" type="radio" name="isParent" value="0"/>
		   </div>
		   <div id="menu_show_w">
		       <label for="email">父菜单:</label>
		       <select id="menu_addFrom_parentId" name="parentId" style="width:200px;"
        		></select>
		   </div>
	   </div>
	   
	</form>
	<script th:inline="none" type="text/javascript" >
		//初始化父菜单，必须用这个变量，不然报错
		var menuAddFromParentId =$("#menu_addFrom_parentId").combotree({
			checkbox:true,
			//multiple: true 复选框
		});

		menuAddFromParentId.combotree('loadData',memuUpdateFormData());

	$("input[name=isParent]").click(function(){
		if(this.value==1){
			$("#menu_show_w").show();
			$("#menu_addFrom_parentId").combotree('enableValidation');
		}else{
			$("#menu_show_w").hide();
			$("#menu_addFrom_parentId").combotree('disableValidation');
		}
	})
	
	$("#menu_addFrom_name").textbox({
		missingMessage:'菜单名称：如：[角色管理]'
	})
	$("#menu_addFrom_urlPath").textbox({
		missingMessage:'页面要访问的地址：格式：user/index.html'
	})
   </script>
</body>
</html>